Good adherence to anti-retroviral therapy (ART) is widely accepted as a key factor for sustained viral suppression of human immunodeficiency virus (HIV), and is often considered a prerequisite for maintenance on a prescribed drug regimen and optimal patient outcomes. However, the extent to which adherence to a given choice of therapy (relative to another therapy), contributes to virologic failure is complex and stll poorly understood, and is a pressing mediation question in HIV research. Understanding this issue is particularly important in resource poor settings where ART regimen options are limited and adherence to lifelong multi- drug daily dosing is challenging but necessary. In such settings, quantifying to what degree differential rates of virologic failure are due to difference in adherence rates between therapies would inform the extent to which failure rates could be improved by programs that increase adherence rates for certain ARTs, rather than improving ART regimens themselves. Such adherence interventions have been very successful in the treatment of tuberculosis and are considered important in the treatment of HIV. Unfortunately, traditional approaches to mediation analysis assume static settings with no unobserved confounding, and are thus not suited for analysis of complex longitudinal data typically encountered in observational studies of HIV. Our plan is to remedy this deficiency using recent developments in causal inference based on potential outcomes and graphical models, and modern semi-parametric theory.